{% extends "bootstrap/base.html" %}

{% block title %}Flasky{% endblock %}

{% block head %}
{{ super() }}
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles.css') }}">
{% endblock %}

{% block navbar %}
<div class="navbar navbar-inverse" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{{ url_for('main.index') }}">LBSN</a>
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                {% if current_user.is_authenticated %}
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        关于数据集 <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="{{ url_for('main.dataset_description') }}">数据集描述</a></li>
                        <li><a href="{{ url_for('main.dataset_analysis') }}">数据集整体分析</a></li>
                        <li><a href="{{ url_for('main.user_analysis') }}">针对某个用户的分析</a></li>
                        <li><a href="{{ url_for('main.poi_analysis') }}">针对某个地点的分析</a></li>
                    </ul>
                </li>
                
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        不同实现方式的评估 <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="{{ url_for('main.evaluate') }}">当前模型评估</a></li>
<!--
                        <li><a href="{{ url_for('auth.change_password') }}">协同过滤 V.S. 矩阵块</a></li>
                        <li><a href="{{ url_for('auth.change_email_request') }}">Select Course Result</a></li>
                        <li><a href="{{ url_for('main.user', username=current_user.username) }}">Teach Arrangement</a></li>
                        <li><a href="{{ url_for('auth.logout') }}">Exam Arrangement</a></li>
                        <li><a href="{{ url_for('auth.logout') }}">Exam Arrangement</a></li>
                        <li><a href="{{ url_for('auth.logout') }}">Exam Arrangement</a></li>
-->
                        <li><a href="{{ url_for('main.result') }}">
                        结果展示</a></li>
                    </ul>
                </li>
                                
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        重新训练 <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="{{ url_for('main.retrain') }}">重置模型参数</a></li>
                        <li><a href="{{ url_for('main.reinput') }}">重置输入数据</a></li>
                    </ul>
                </li>
                {% endif %}
            </ul>
            <ul class="nav navbar-nav navbar-right">
                {% if current_user.can(Permission.MODERATE_COMMENTS) %}
                <li><a href="{{ url_for('main.moderate') }}">Moderate Comments</a></li>
                {% endif %}
                {% if current_user.is_authenticated %}
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <img src="{{ url_for('static',filename='gravatar.jpg') }}">
                        {{ current_user.username }} <b class="caret"></b> <!-- my account 我的账号 -->
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="{{ url_for('auth.change_password') }}">修改密码</a></li>
                        <li><a href="{{ url_for('auth.change_email_request') }}">修改邮箱</a></li>
                        <li><a href="{{ url_for('main.user', username=current_user.username) }}">我的简历</a></li>
                        <li><a href="{{ url_for('auth.logout') }}">登出</a></li>
                    </ul>
                </li>
                {% else %}
                <li><a href="{{ url_for('auth.login') }}">Log In</a></li>
                {% endif %}
            </ul>
        </div>
    </div>
</div>
{% endblock %}

{% block content %}
<div class="container">
    {% for message in get_flashed_messages() %}
    <div class="alert alert-warning">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        {{ message }}
    </div>
    {% endfor %}

    {% block page_content %}{% endblock %}
</div>
{% endblock %}

{% block scripts %}
{{ super() }}
{{ moment.include_moment() }}
{% endblock %}
